

package com.loser.excel.constant;

import java.util.concurrent.ExecutorService;
import java.util.concurrent.LinkedBlockingQueue;
import java.util.concurrent.ThreadPoolExecutor;
import java.util.concurrent.TimeUnit;

/**
 * 线程池
 *
 * @author alan
 * @date 2022/5/30 17:37
 */
public class ConstExecutor {

    /**
     * 公用线程池，用来异步执行一些非重要操作，这里只给150个线程，对于需要及时完成的任务应该使用专用线程池
     */
    public static final ExecutorService EXECUTOR_GENERAL = new ThreadPoolExecutor(10, 150,
            0L, TimeUnit.MILLISECONDS, new LinkedBlockingQueue<>(10000));

}
